<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	    <script type="text/javascript" src="../../zxt/zxt.js"></script>
	    <script>
	    	importZXT("../../zxt");
	    </script>	
	</head>

<body>

    <div id="layoutForm" zxt="zxt.ui.Form">
      <table width="100%" border="0" id="FormLayout" class="zxt-DataForm">
        <thead>
            <tr class="zxt-FormHeader">
              <th colspan="4" align="left">显示信息</th>
            </tr>
          </thead>
        <tr class="zxt-FormBody">
          <td width="15%">编号</td>
          <td width="35%" class="tdl"><div zxt="zxt.ui.Field " zxt.name="id" zxt.title="工号" zxt.type="label"></div></td>
          <td width="15%">性别</td>
          <td width="35%" class="tdl"><div field="sex"></div></td>          
        </tr>		
		<tr class="zxt-FormBody">
          <td colspan="1">名称</td>
          <td colspan="3" class="tdl"><div field="name"></div></td>                
        </tr>
        <tr class="zxt-FormBody">
          <td colspan="1">生日</td>
          <td colspan="3" class="tdl"><div field="birthday"></div></td>                
        </tr>
      </table>
    </div>
	<div>
		<a href="../index.html">返回</a>
	</div>
</body>
</html>

<script type="text/javascript">
	$( onLoaded )
	 var show_form, lForm;
	
	function onLoaded() {
	   showLayoutForm();
	}  
	


	function showLayoutForm(){
		lForm = new zxt.ui.Form();      		
		lForm.addField({ name:"id", title: "工号", type: "label"} );
		lForm.addField({ name:"name", title: "姓名", type: "text"} );
		lForm.addField({ name:"sex", title: "性别", type: "select"} );
		lForm.addField({ name:"birthday", title: "生日", type: "date"} );
		
		var c4sex = [{label:"男", value:"Male"}, {label:"女", value:"Female" }];
		lForm.getInteractor("sex").options( c4sex );
		
			
		lForm.setValue({id:"179371", name:"Han Qiuming", sex:"Male", birthday:"1976-11-12" });
		lForm.setLayout( "FormLayout" );		
	  var parent = $("#layoutForm").append( lForm.render() );
	}


</script>